import request from '@/utils/request'

// 查询街道列表（分页）
export function listStreet(query) {
  return request({
    url: '/house/street/list',
    method: 'get',
    params: query
  })
}

// 查询街道列表（不分页，用于下拉选择）
export function listStreetOptions(query) {
  return request({
    url: '/house/street/list',
    method: 'get',
    params: {
      ...query,
      pageSize: 999
    }
  })
}

// 查询街道详细
export function getStreet(streetId) {
  return request({
    url: '/house/street/' + streetId,
    method: 'get'
  })
}

// 新增街道
export function addStreet(data) {
  return request({
    url: '/house/street',
    method: 'post',
    data: data
  })
}

// 修改街道
export function updateStreet(data) {
  return request({
    url: '/house/street',
    method: 'put',
    data: data
  })
}

// 删除街道
export function delStreet(streetId) {
  return request({
    url: '/house/street/' + streetId,
    method: 'delete'
  })
} 